<?php
require './include/global.php';
if(!$_SESSION[uname]){
require_once 'include/train_db.php';
}

//print_r($_SESSION);
$smarty->compile_check = true;
$smarty->display('header.tpl');

switch($_SESSION[usertype]){
   case recruiter:
	   $anid = "3";
   break;
    case employer:
	   $anid = "4";
   break;  
   case candidate:
	   $anid = "5";
   break;  
   case advisor:
	   $anid = "6";
   break; 

}


$sql = "SELECT * FROM pa_announce WHERE an_id = '".$anid."'";
$arr = $DB->fetch_one_array($sql);

$smarty->assign('title',$arr[an_title]);
$smarty->assign('content',$arr[an_content]);


if($_SESSION[uname]){
require './include/all_left.php';
$smarty->display('allleft.tpl');
}else{
$smarty->display('left.tpl');
}

$smarty->display('announce.tpl');



if($_SESSION[uname]){
require_once './include/advisory_db.php';
$smarty->display('allright.tpl');
}else{
$smarty->display('right.tpl');
}
$smarty->display('footer.tpl');
?>
